

package com.maoshi.shop.distribution.comment.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.maoshi.shop.distribution.comment.model.DistributionLevel;
import com.maoshi.shop.distribution.comment.model.DistributionLevelSet;
import com.maoshi.shop.distribution.comment.model.DistributionUser;
import com.maoshi.shop.distribution.comment.vo.DistributionAwardDataVO;

import java.util.List;

/**
 * @author lgh on 2019/04/04.
 */
public interface DistributionLevelService extends IService<DistributionLevel> {


//    List<DistributionLevel> geyByShopId(Long shopId);

    //  void saveByDistributionLevelSet(DistributionLevelSet distributionLevelSet);

//    List<DistributionLevel> autoInsertOrUpdateByList(List<DistributionLevel> list);

//    DistributionAwardDataVO getDistributionAwardDataVOByLevelId(Long levelId);

//    List<DistributionLevelDto> getDistributionLevelDtoByShopId(Long shopId);

//    DistributionLevelDto getDistributionLevelDtoByDistributionUserId(Long distributionUserId);

    /**
     * 尝试进行升级
     *
     * @param distributionUser     分销员信息
     * @param distributionLevelSet 升级设置
     */
    void tryingToUpgrade(DistributionUser distributionUser, DistributionLevelSet distributionLevelSet);

    DistributionLevel getLevelInfo(int level, List<DistributionLevel> distributionLevels);

    /**
     * 通过等级获取分销奖励
     *
     * @param levelId
     * @return
     */
    DistributionAwardDataVO getDistributionAwardDataVOByLevelId(Long levelId);

    /**
     * 更改分销员等级
     * @param distributionUserId 分销员id
     * @param levelId 等级id
     * @param type 类型(0 自动升级 1手动升级)
     */
//    void upgrade(Long distributionUserId,Long levelId,Integer type);

    /**
     * 获取下一级等级
     * @param shopId 店铺id
     * @param distributionUserId 分销员id
     * @return
     */
//    DistributionLevelVO getSeniorLevelVOIdByDistributionUserId(@Param("shopId") Long shopId, @Param("distributionUserId") Long distributionUserId);
}
